
=begin pod

=TITLE class Telemetry::Instrument::Usage

=SUBTITLE Instrument for collecting getrusage data

    class Telemetry::Instrument::Usage { }

B<Note: > This class is a Rakudo-specific feature and not standard Perl 6.

Objects of this class are generally not created by themselves, but rather
through making a L<snap|/type/Telemetry>shot.

=head2 Useful readings

This class provides the following generally usable readings (in alphabetical
order):

=item cpu

The total amount of CPU time (in microseconds), essentially the sum of
C<cpu-user> and C<cpu-sys>.

=item cpu-sys

The number of microseconds of CPU used by the system.

=item cpu-user

The number of microseconds of CPU used by the user program.

=item cpus

The number of CPU's active, essentially C<cpu> divided by C<wallclock>.

=item max-rss

The maximum resident set size (in KiB).

=item util%

Percentage of CPU utilization, essentially 100 * C<cpus> / number of CPU cores.

=item wallclock

The time the program has been executing (in microseconds).

=head Less useful readings

The following readings may or may not contain sensible information, mostly
depending on hardware and OS being used.  Please check your local C<getrusage>
documentation for their exact meaning:

  =begin code :lang<text>
  name        getrusage struct name
  ====        =====================
  max-rss     ru_maxrss
  ix-rss      ru_ixress
  id-rss      ru_idrss
  is-rss      ru_isrss
  minf        ru_minflt
  majf        ru_majflt
  nswp        ru_nswap
  inb         ru_inblock
  outb        ru_oublock
  msnd        ru_msgsnd
  mrcv        ru_msgrcv
  nsig        ru_nsignals
  volcsw      ru_nvcsw
  invcsw      ru_nivcsw
  =end code

=end pod

# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
